package com.test.springbootdemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Properties;

@SpringBootApplication
public class SpringbootDemoApplication {

    public static void main(String[] args) {
        //SpringApplication.run(SpringbootDemoApplication.class, args);

        //测试关闭
        //ConfigurableApplicationContext app = SpringApplication.run(SpringbootDemoApplication.class, args);
        //app.close();



        //属性配置方式1
        SpringApplication app = new SpringApplication(SpringbootDemoApplication.class);
        Properties properties = new Properties();
        properties.setProperty("name", "001");
        app.setDefaultProperties(properties);
        app.run(args);

    }

}
